package com.woniu.cinema.service.impl;

import java.util.List;

import com.woniu.cinema.vo.HallMovieVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.cinema.mapper.HallMovieMapper;
import com.woniu.cinema.domain.HallMovie;
import com.woniu.cinema.service.HallMovieService;

/**
 * 电影和影厅排片Service业务层处理
 *
 * @author yy
 * @date 2023-09-27
 */
@Service
public class HallMovieServiceImpl implements HallMovieService
{
    @Autowired
    private HallMovieMapper hallMovieMapper;

    /**
     * 查询电影和影厅排片
     *
     * @param hallMovieId 电影和影厅排片ID
     * @return 电影和影厅排片
     */
    @Override
    public HallMovie selectHallMovieById(Integer hallMovieId)
    {
        return hallMovieMapper.selectHallMovieById(hallMovieId);
    }

    /**
     * 查询电影和影厅排片列表
     *
     * @param hallMovie 电影和影厅排片
     * @return 电影和影厅排片
     */
    @Override
    public List<HallMovie> selectHallMovieList(HallMovie hallMovie)
    {
        return hallMovieMapper.selectHallMovieList(hallMovie);
    }

    /**
     * 新增电影和影厅排片
     *
     * @param hallMovie 电影和影厅排片
     * @return 结果
     */
    @Override
    public int insertHallMovie(HallMovie hallMovie)
    {
        return hallMovieMapper.insertHallMovie(hallMovie);
    }

    /**
     * 修改电影和影厅排片
     *
     * @param hallMovie 电影和影厅排片
     * @return 结果
     */
    @Override
    public int updateHallMovie(HallMovie hallMovie)
    {
        return hallMovieMapper.updateHallMovie(hallMovie);
    }

    /**
     * 批量删除电影和影厅排片
     *
     * @param hallMovieIds 需要删除的电影和影厅排片ID
     * @return 结果
     */
    @Override
    public int deleteHallMovieByIds(Integer[] hallMovieIds)
    {
        return hallMovieMapper.deleteHallMovieByIds(hallMovieIds);
    }

    /**
     * 删除电影和影厅排片信息
     *
     * @param hallMovieId 电影和影厅排片ID
     * @return 结果
     */
    @Override
    public int deleteHallMovieById(Integer hallMovieId)
    {
        return hallMovieMapper.deleteHallMovieById(hallMovieId);
    }

    @Override
    public List<HallMovieVo> queryHallMovieByCinemaId(Integer cinemaId) {


        return hallMovieMapper.queryHallMovieByCinemaId(cinemaId);
    }
}
